#ifndef VSTARTPAGE_H
#define VSTARTPAGE_H

#include <QFrame>
#include <QString>
#include <QListWidgetItem>
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkReply>
#include <QtWidgets/QWidget>
#include <QTextCodec>
#include <QString>
#include <QUrl>
#include <QDesktopServices>

namespace Ui {
class VStartPage;
}

class VStartPage : public QFrame
{
    Q_OBJECT

public:
    enum SignalType
    {
        START,
        HISTORICAL,
        INFORMATION
    };

    explicit VStartPage(QWidget *parent = 0);
    ~VStartPage();

    QString _icon_new_project_path;
    QString _icon_open_path;
    QString _icon_project_path;
    QString _icon_message_path;

    void load();
    void load_historical();
    void load_start();
    void load_information();

signals:
    void signal_startpage_action(int type, QString text);

private slots:
    void on_listwidget_start_itemClicked(QListWidgetItem *item);
    void on_listwidget_old_itemClicked(QListWidgetItem *item);
    void slot_replayFinished(QNetworkReply *reply);

    void on_listwidget_info_itemClicked(QListWidgetItem *item);

private:
    Ui::VStartPage *ui;
    QNetworkAccessManager *m_manager;
};

#endif // VSTARTPAGE_H
